home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: news.dcs.warwick.ac.uk!not-for-mail
- From: D.C.Molero@dcs.warwick.ac.uk (Daniel Castillo Molero)
- Subject: random number
- X-Nntp-Posting-Host: sword
- Message-ID: <1996Feb4.020051.12889@dcs.warwick.ac.uk>
- Sender: news@dcs.warwick.ac.uk (Network News)
- Organization: Department of Computer Science, Warwick University, England
- Date: Sun, 4 Feb 1996 02:00:51 GMT
-
- Hi,
- Could anybody help me to generate some code to produce
- a random number between -3 and 3 ?
- I'm trying to useárand(), but since it doesn't receive
- any argument, I cannot specify the range. Probably one
- way would be to access the constant RAND_MAX, but I don't know
- how to do this, since I'm new in c.
- Any help will be grately appreciated.
- Thank you.
-
- Dan
-
- --
- * Daniel Castillo. D.C.Molero@dcs.warwick.ac.uk *
-
-
-